// 报表相关API
import request from '../utils/request'

// 获取营销报告数据
export const getMarketingReport = (params) => {
  return request({
    url: '/api/reports/marketing',
    method: 'get',
    params
  })
}

// 获取业绩报告数据
export const getPerformanceReport = (params) => {
  return request({
    url: '/api/reports/performance',
    method: 'get',
    params
  })
}
// 导出营销报告
export const exportMarketingReport = (params) => {
  return request({
    url: '/api/reports/marketing/export',
    method: 'get',
    params,
    responseType: 'blob'
  })
}

// 导出生绩报告
export const exportPerformanceReport = (params) => {
  return request({
    url: '/api/reports/performance/export',
    method: 'get',
    params,
    responseType: 'blob'
  })
}

// 导出流量报告
export const exportTrafficReport = (params) => {
  return request({
    url: '/api/reports/traffic/export',
    method: 'get',
    params,
    responseType: 'blob'
  })
}